<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <base target="_parent">
</head>
<script>
    window.addEventListener('load', function () {
        let message = {height: document.body.scrollHeight, width: document.body.scrollWidth};
        window.top.postMessage(message, "*");
    });
</script>
<style>
    table {
        width: 100%;
        margin-bottom: 20px;
        border: 1px solid #b2b2b2;
        border-collapse: collapse;
    }
    table th {
        font-weight: bold;
        padding: 5px;
        background: #6bb6ef;
        border: 1px solid #b2b2b2;
    }
    table td {
        border: 1px solid #b2b2b2;
        padding: 5px;
    }
</style>
<body>
<table>
    <thead>
    <th>Адрес</th>
    <th>X</th>
    <th>Y</th>
    <th>Ссылка</th>
    </thead>
    <tbody>
    <th:block th:each="addr : ${list}">
        <tr>
            <th><p th:text="${addr.getRequest()}"></p></th>
            <td th:unless="${addr.getItem() != null}">не определено</td>
            <td th:unless="${addr.getItem() != null}">не определено</td>
            <td th:unless="${addr.getItem() != null}">не определено</td>
            <td th:if="${addr.getItem() != null}"><p th:text="${addr.getItem().getCentroid().getX()}"></p></td>
            <td th:if="${addr.getItem() != null}"><p th:text="${addr.getItem().getCentroid().getY()}"></p></td>
            <td th:if="${addr.getItem() != null}">
                <a th:href="@{http://localhost:3000/map(object=${addr.getItem().getId()})}">перейти</a>
            </td>
        </tr>
    </th:block>
    </tbody>
</table>
</body>
</html>